/*
 * Copyright (c) 2009 The Regents of The University of Michigan
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met: redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer;
 * redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution;
 * neither the name of the copyright holders nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * Authors: Lei Zhang
 */

#include <cassert>

#ifndef __ARCH_UNICORE_INTREGS_HH__
#define __ARCH_UNICORE_INTREGS_HH__

#include "arch/unicore/types.hh"

namespace UnicoreISA
{

// These codes are copied and modified from ARM.
enum IntRegIndex
{
    /* All the unique register indices. */
    INTREG_R0,
    INTREG_R1,
    INTREG_R2,
    INTREG_R3,
    INTREG_R4,
    INTREG_R5,
    INTREG_R6,
    INTREG_R7,
    INTREG_R8,
    INTREG_R9,
    INTREG_R10,
    INTREG_R11,
    INTREG_R12,
    INTREG_R13,
    INTREG_R14,
    INTREG_R15, // 啊多么痛的领悟
    INTREG_R16,
    INTREG_R17,
    INTREG_R18,
    INTREG_R19,
    INTREG_R20,
    INTREG_R21,
    INTREG_R22,
    INTREG_R23,
    INTREG_R24,
    INTREG_R25,
    INTREG_R26,
    INTREG_R27,
    INTREG_R28,
    INTREG_R29,
    INTREG_R30,
    INTREG_R31,
    INTREG_SB = INTREG_R25, // static base
    INTREG_SL = INTREG_R26, // stack limit pointer
    INTREG_FP = INTREG_R27, // frame pointer
    INTREG_IP = INTREG_R28, // inter-procedure pointer
    INTREG_SP = INTREG_R29, // stack pointer
    INTREG_LR = INTREG_R30, // link register
    INTREG_PC = INTREG_R31  // program counter
    };

}

#endif
